IApi.ConfigureDc method

Configures distributed clock (DC) options. Distributed clocks allow the synchronization of the slave cycles with the KINGSTAR cycle. It is highly recommended for any motion application to avoid vibrations.

Namespace: IntervalZero.KINGSTAR.Base.Api

Assembly: IntervalZero.KINGSTAR.Base.Api (in IntervalZero.KINGSTAR.Base.dll) Version: 4.4.0.0

Syntax

C#VB
KsError ConfigureDc(
       bool Active,
       bool CheckStatus,
       bool MasterShift,
       int ReferenceIndex
)
Function ConfigureDc(
       Active As Boolean,
       CheckStatus As Boolean,
       MasterShift As Boolean,
       ReferenceIndex As Integer
) As KsError

Parameters

Active

Type: bool

true to enable, and false to disable DC synchronization. By default, it is true.

 

CheckStatus

Type: bool

Enables checking of the DC jitter during startup. The devices will go to the operational state (Op) once the synchronization is done. This slows the startup around 15 seconds. By default, it is true.

 

MasterShift

Type: bool

Chooses the shift mode. true: Master Shift. false: Bus Shift. By default, it is false.

Bus Shift means that the EtherCAT slaves follow the master (computer) clock. Master Shift means the slaves and the master follow one of the slaves called "Reference Clock." By default, the Reference Clock will be the first slave on the bus that supports DC.

NOTE:  The slave clocks may be more precise than the computer clock so Master Shift is more stable. However, Master Shift modifies the computer clock's speed which impacts all time stamps done on the computer. This can be a problem if there are other protocols used on the same computer.

 

ReferenceIndex

Type: int

Selects which device is the reference clock. This parameter is a slave ID, which is the EtherCAT ID of a device. It corresponds to the position of the device in the EtherCAT loop. The ID is zero based and is not affected by aliasing.

NOTE:  ReferenceIndex has not been implemented yet.

Return value

Type: KsError

A return code of a method.

Remarks

Usable EtherCAT states

ecatOffline

Examples

C#
N/A

See also

IApi Interface

IntervalZero.KINGSTAR.Base.Api Namespace